package com.xio.cloud.service;

import com.xio.cloud.domain.Account;
import com.baomidou.mybatisplus.extension.service.IService;
import org.springframework.web.bind.annotation.RequestParam;

import java.math.BigDecimal;

/**
 * @Author: xio
 * @Description: ${Description}
 * @Date: 2021/3/31 20:55
 */
public interface AccountService extends IService<Account>{

    /**
     * 扣账户余额
     *
     * @param userId 用户 id
     * @param money 使用金额
     * @return: boolean
     */
    boolean decrease(@RequestParam("userId") Long userId,
                     @RequestParam("money") BigDecimal money);

}
